<?php ob_start() ?>

<div class="row">
    <?php if (isset($_SESSION['publicidad_msj'])) { ?>
        <div class="alert alert-success alert-dismissable col-lg-12 text-center">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <strong><?php echo $_SESSION['publicidad_msj'] ?></strong>
        </div>
        <?php
        unset($_SESSION['publicidad_msj']);
    }
    ?>
    <div class="col-lg-12">
        <h1>Sitios <small>Datos Sitio</small></h1>
    </div>
</div>
<hr>
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-archive"></i> Datos del sitio</h3>
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered table-striped table-hover">
                        <tbody>
                            <tr>
                                <th>Nombre</th>
                                <td><?php echo $obj_sitio->nombre ?></td>
                            </tr>
                            <tr>
                                <th>Descripción</th>
                                <td><?php echo $obj_sitio->descripcion ?></td>
                            </tr>
                            <tr>
                                <th>URL</th>
                                <td><a href="<?php echo $obj_sitio->url ?>" target="_blank" title="<?php echo $obj_sitio->nombre ?>"><?php echo $obj_sitio->url ?></a>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <?php if ($_SESSION['weokey_publicidad_tipo_usuario'] == md5('administrador')) { ?>
        <a class="btn btn-primary" href="modificar_sitio/<?php echo $_GET['id']; ?>"><i class="fa fa-edit"></i> Modificar Sitio</a>
        <a class="btn btn-primary" href="eliminar_sitio/<?php echo $_GET['id']; ?>"><i class="fa fa-trash-o"></i> Eliminar Sitio</a>
        <?php } ?>
     </div>

    <?php
    $contenido = ob_get_clean();
    include "app/templates/$template.php";
    ?>
